1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Linq;
7 using System.Text;
8 using System.Threading.Tasks;
9 using System.Windows.Forms;
10
11 namespace SoftQuanLyNhaHang.Controllers
12 {
13 class UrlWebCtrl
14 {
15
16 public static int InsertUrlWeb(int _IdUrl, string _UrlPath, string _Domain, string _TrangThai)
17 {
18 try
19 {
20 Models.UrlWebMod sp = new Models.UrlWebMod(_IdUrl, _UrlPath, _Domain, _TrangThai);
21 return sp.InsertUrlWeb();
22 }
23 catch
24 {
25 return 0;
26 }
27 }
28
29 public static int Insert2_UrlWeb(int _IdUrl, string _UrlPath, string _Domain, string _TrangThai, DateTime _NgayTao, int _LoadLan)
30 {
31 try
32 {
33 Models.UrlWebMod sp = new Models.UrlWebMod(_IdUrl, _UrlPath, _Domain, _TrangThai, _NgayTao, _LoadLan);
34 return sp.Insert2_UrlWeb();
35 }
36 catch
37 {
38 return 0;
39 }
40 }
41
42 //update
43 public static int Update2_UrlWeb(string _UrlPath, int _LoadLan)
44 {
45 try
46 {
47 Models.UrlWebMod _thanhToan = new Models.UrlWebMod(_UrlPath, _LoadLan);
48 return _thanhToan.Update2_UrlWeb();
49 }
50 catch
51 {
52 return 0;
53 }
54
55 }
56
57 //hien thi theo domain
58 public static DataSet FillAllDsUrl(string _Domain)
59 {
60 try
61 {
62 Models.UrlWebMod sp = new Models.UrlWebMod(_Domain);
63 return sp.FillAllDsUrl();
64 }
65 catch
66 {
67 return null;
68 }
69 }
70
71 public static DataSet FillAllDsUrl_getTenGiaMaSp(string _Domain)
72 {
73 try
74 {
75 Models.UrlWebMod sp = new Models.UrlWebMod(_Domain);
76 return sp.FillAllDsUrl_getTenGiaMaSp();
77 }
78 catch
79 {
80 return null;
81 }
82 }
83
84 public static DataSet FillAllUrl_LoadLan0(string _Domain)
85 {
86 try
87 {
88 Models.UrlWebMod sp = new Models.UrlWebMod(_Domain);
89 return sp.FillAllUrl_LoadLan0();
90 }
91 catch
92 {
93 return null;
94 }
95 }
96 //
97 }
98 }